<template>
  <VDialog @close="handleClose" :disabled="true" width="90%">
    <template #content>
      <div style="height: 80vh">
        <iframe :src="data" style="width: 100%; height: 80vh"></iframe>
      </div>
    </template>
  </VDialog>
</template>
<script setup>
import { ElMessage } from "element-plus";
const props = defineProps({
  data: { type: String, default: "" },
});
// 创建 BroadcastChannel 实例
const channel = new BroadcastChannel("my_channel");

// 发送消息
// channel.postMessage('Hello from tab 1');
// const save = () => {};
const handleClose = async (refresh) => {
  emit("update:modelValue", false);
  emit("close");
  if (refresh) emit("refresh");
};
</script>
